
const express = require('express')

const app = express()

const bodyParser = require('body-parser')
app.use(bodyParser.urlencoded({
    extended: false
}))

app.get('/', (req, res) => {
    res.sendFile('./views/post.html', {
        root: __dirname
    })
})

app.post('/user', (req, res) => {
    res.send(req.body)
})

app.listen(8888, () => {
    console.log('http://127.0.0.1:8888')
})